package org.crl.blogsystem.repository;

import org.crl.blogsystem.entity.User;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;


@Repository
public interface UserRepository extends CrudRepository<User, Long> {
    boolean existsByPhone(String username);

    List<User> findAllById(Long userId);

    List<User> findAllByUsernameContaining(String key);

    User findUsersById(Long id);

    boolean existsByFollowersIdAndFollowingId(Long loginId, Long userId);
}
